using Unity.Entities;
using Unity.Mathematics;
using Unity.NetCode;

namespace POC.Common
{
    public struct ChampTag : IComponentData { }
    
    /// <summary>
    /// 标记新加入的玩家，将对新加入的玩家进行一些初始化的工作
    /// </summary>
    public struct NewChampTag : IComponentData { }
    
    /// <summary>
    /// 标记本地玩家
    /// </summary>
    public struct OwnerChampTag : IComponentData { }

    /// <summary>
    /// 队伍，服务端分配后，客户端会根据[GhostField]将队伍信息同步到客户端
    /// </summary>
    public struct MobaTeam : IComponentData
    {
        [GhostField] public TeamType Value;
    }

    /// <summary>
    /// 角色移动速度
    /// </summary>
    public struct CharacterMoveSpeed : IComponentData
    {
        public float Value;
    }

    /// <summary>
    /// 会自动将客户端输入同步到服务端
    /// </summary>
    [GhostComponent(PrefabType = GhostPrefabType.AllPredicted)]
    public struct ChampMoveTargetPosition : IInputComponentData
    {
        [GhostField(Quantization = 0)] public float3 Value;
    }

    [GhostComponent(PrefabType = GhostPrefabType.AllPredicted)]
    public struct AbilityInput : IInputComponentData
    {
        [GhostField] public InputEvent AoeAbility;
    }
}